<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>事件</title>
</head>
<body>
	<p id="p2">广州</p>

	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript">
		var p2 = $('#p2')
		// 绑定
		p2.bind('click', function(){
			alert('我只执行一次')
			// 解绑
			p2.unbind('click')
		})
		
		function clickP(){
			p2.trigger('click')
		}
		// 3秒后自动触发点击p标签
		setInterval(clickP, 3000)

	</script>
</body>
</html>